package cn.itsource.pethome.system.service.impl;

import cn.itsource.pethome.base.service.impl.BaseServiceImpl;
import cn.itsource.pethome.system.domain.DictionaryDetail;
import cn.itsource.pethome.system.mapper.DictionaryDetailMapper;
import cn.itsource.pethome.system.service.IDictionaryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DictionaryDetailServiceImpl extends BaseServiceImpl<DictionaryDetail> implements IDictionaryDetailService{
    @Autowired
    private DictionaryDetailMapper dictionaryDetailMapper;
    @Override
    public void insert(DictionaryDetail dictionaryDetail) {
        DictionaryDetail byName = dictionaryDetailMapper.findByName(dictionaryDetail);
        if(byName == null){
            //先去判断当前这个值是否存在
            super.insert(dictionaryDetail);
        }
    }
}
